package com.captain.leetcode;

import java.util.Arrays;
import java.util.Comparator;

/**
 * @author captain
 * @Des
 * @Date 2021/7/21 22:24
 */
public class Test {

    public static void main(String[] args) {
        int[][] arr = new int[][]{{1, 3}, {12, 2, 6}, {10, 8, 10}, {15, 18}};
        Arrays.sort(arr, Comparator.comparingInt(o -> o[0]));
        for (int[] ints : arr) {
            System.out.println(Arrays.toString(ints));
        }
    }
}
